package com.xiaoy.core.base.dictionary.action;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Results;

import com.xiaoy.core.base.dictionary.service.DictionaryService;
import com.xiaoy.web.BasicAction;
@Namespace("/base/dictionary")
@Results( {
})
public class DictionaryAction extends BasicAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2712271567222141697L;
	
	@Resource(name="dictionaryService")
	private DictionaryService service;
	
	
	public DictionaryAction () {
//		System.out.println("DictionaryAction");
	}
	
	public String list () {
		System.out.println("dictionary");
//		InitPageWrapper();ARMXQAABNRbnmmtY
//		request.setAttribute("pageBean", service.filterPage(pageBean));
		return "list";
	}
	
	public void staticList () {
		
		initPageWrapper();
		
//		return "staticList";
	}
	public String dynamicList () {
		initPageWrapper();
		service.filterPage(pageBean);
		return "dynamiclist";
	}
	
	public void dynamic () {
		initPageWrapper();
		renderJson(service.filterPage(pageBean));
	}
	
//	public void createJs ()  {
//		
//		try {
//			Struts2Utils.renderText(service.createProvinceCtiyJs());
//		} catch (IOException e) {
//			e.printStackTrace();
//		}
//	}
	
	

}
